Skip to content

refactor: centralize ESLint file targeting within eslint.config.mjs to process only TypeScript files and ignore JavaScript files#32601

Merged
alan-agius4 merged 1 commit intoangular:mainfrom
alan-agius4:eslint
Feb 26, 2026
Merged

refactor: centralize ESLint file targeting within eslint.config.mjs to process only TypeScript files and ignore JavaScript files#32601
alan-agius4 merged 1 commit intoangular:mainfrom
alan-agius4:eslint

Conversation

@alan-agius4
Copy link
Collaborator

This is needed as the glob is no longer being parsed from the CLI.

Run pnpm lint --cache-strategy content

> @angular/devkit-repo@22.0.0-next.0 lint /home/runner/work/angular-cli/angular-cli
> eslint --cache --max-warnings=0 "**/*.@(ts|mts|cts)" --cache-strategy content

Oops! Something went wrong! :(

ESLint: 10.0.2

No files matching the pattern "**/*.@(ts|mts|cts)" were found.
Please check for typing mistakes in the pattern.

 ELIFECYCLE  Command failed with exit code 2.

@alan-agius4 alan-agius4 requested a review from clydin February 26, 2026 14:18
@alan-agius4 alan-agius4 added target: patch This PR is targeted for the next patch release requires: TGP action: review The PR is still awaiting reviews from at least one requested reviewer target: minor This PR is targeted for the next minor release and removed requires: TGP target: patch This PR is targeted for the next patch release labels Feb 26, 2026
… to process only TypeScript files and ignore JavaScript files

This is needed as the glob is no longer being parsed from the CLI.

```
Run pnpm lint --cache-strategy content

> @angular/devkit-repo@22.0.0-next.0 lint /home/runner/work/angular-cli/angular-cli
> eslint --cache --max-warnings=0 "**/*.@(ts|mts|cts)" --cache-strategy content

Oops! Something went wrong! :(

ESLint: 10.0.2

No files matching the pattern "**/*.@(ts|mts|cts)" were found.
Please check for typing mistakes in the pattern.

 ELIFECYCLE  Command failed with exit code 2.
```
@alan-agius4 alan-agius4 reopened this Feb 26, 2026
Comment on lines +31 to +33
'**/*.js',
'**/*.mjs',
'**/*.cjs',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need both this and the above?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean the cjs variant?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i meant the ignore plus the files options

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it was not working correctly when it was in the same object.

@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Feb 26, 2026
@alan-agius4 alan-agius4 merged commit 15794dc into angular:main Feb 26, 2026
38 checks passed
@alan-agius4
Copy link
Collaborator Author

This PR was merged into the repository. The changes were merged into the following branches:

@alan-agius4 alan-agius4 deleted the eslint branch February 26, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants